<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
	<title>继承自角色的权限</title>
	<%@ include file="/common/meta.jsp" %>
    <%@ include file="/common/import.jsp" %>
	<%@ include file="uct-import.jsp" %>
	<script>
		var userId = "${userId}";
		$(function(){		
		$('#roleAct').datagrid({
				title:'',
				//iconCls:'icon-ok',
				url:'${ctx}/uct/core/user-right-role!data.action?userId='+userId,
				loadMsg:'数据载入中，请稍后……',
				fitColumns: true,
				nowrap: true,
				rownumbers: true,
				striped: true,
				collapsible:false,				
				fitColumns: true,				
				singleSelect:true,
				rownumbers:true,
				remoteSort: false,
				pagination:true,
				pageList:[10,15,20,30,50],
				idField:'actId',
				columns:[[
					{field:'actCname',title:'权限名称',width:100,sortable:true,
						sorter:function(a,b){
							return (a>b?1:-1);
						}						,
						formatter:function(value){
		                	return '<span style="color:red">'+value+'</span>';
		                }
					},
					{field:'fullEname',title:'权限英文全称',width:100,sortable:true,
						sorter:function(a,b){
							return (a>b?1:-1);
						}
					},
					
					{field:'fullCname',title:'权限中文全称',width:100,sortable:true,
						sorter:function(a,b){
							return (a>b?1:-1);
						}
					}
				]]
			});
			
		
			
			
			var p = $('#roleAct').datagrid('getPager');
			if (p){
				$(p).pagination({
					onBeforeRefresh:function(){
						//alert('before refresh');
					}
				});
			}

		});
		
		
</script>		
	
</head>

<body>
	<table id="roleAct"></table>

</body>
</html>